<%--
  Created by IntelliJ IDEA.
  User: dailyblue
  Date: 2025/7/15
  Time: 15:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h3>5-2</h3>
<%

    request.setAttribute("A", "request放的A");
    request.setAttribute("B", "request放的B");
    request.setAttribute("C", "request放的C");
    // session容器操作
    session.setAttribute("A", "session放的A");
    session.setAttribute("B", "session放的B");
    session.setAttribute("C", "session放的C");
    session.removeAttribute("B");
    Object a = session.getAttribute("A");
    Object b = session.getAttribute("B");
    Object c = session.getAttribute("C");
    out.print("a:" + a + "<br/>");
    out.print("b:" + b + "<br/>");
    out.print("c:" + c + "<br/>");

    Object a1 = request.getAttribute("A");
    Object b1 = request.getAttribute("B");
    Object c1 = request.getAttribute("C");
    out.print("a1:" + a1 + "<br/>");
    out.print("b1:" + b1 + "<br/>");
    out.print("c1:" + c1 + "<br/>");

    // request.getRequestDispatcher("5-3.jsp").forward(request, response);
    response.sendRedirect("5-3.jsp");
%>
</body>
</html>
